package org.model.common.bean;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.model.common.constant.Constants;
import org.model.common.exception.ServiceException;
import org.model.common.utils.JsonUtil;

import javax.management.relation.Role;
import java.util.*;

/**
 * 本次请求用户信息.
 *
 * @author zenghao
 * @date 2022/6/6
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class RequestUser extends BaseRequestInfo {

    private static final long serialVersionUID = 5739470021194142202L;

    /**
     * 用户ID.
     */
    private Long userId;

    /**
     * 用户账号.
     */
    private String username;

    /**
     * 手机号.
     */
    private String phone;

    /**
     * 部门ID.
     */
    private Long deptId;

    /**
     * 用户唯一标识.
     */
    private String token;

    /**
     * 登录时间.
     */
    private Long loginTime;

    /**
     * 权限列表.
     */
    private Set<String> permissions;

    /**
     * 角色列表.
     */
    private Set<Role> roles;

    /**
     * 扩展业务属性.
     */
    private Map<String, Object> extras = new HashMap<>();

    public RequestUser() {
    }

}
